import BaseApi from '../BaseApi';

const controller = "/WhiteList";

export default {

    getList(queryCondition) {
        return this.requestPost(controller, "/getList", queryCondition);
    },
    addBlock(addCondition) {
        return this.requestPost(controller, "/addBlock", addCondition);
    },
    removeBlock(value) {
        return this.requestPost(controller, "/removeBlock", value);
    },
    editBlock(value){
        return this.requestPost(controller, "/editBlock", value);
    },
    addListBlock(value){
        return this.requestPost(controller, "/addListBlock", value);
    },
    /**
     * @description 导入白名单数据
     */
    importWhiteListData(condition) {
        return this.requestPost(controller, "/importWhiteListData", condition);
    },
    /*请求封装*/
    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);

    },
    requestGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestGet(newUrl, condition);

    },

}
